<?php

namespace App\Http\Business;

class BusinessResult
{
    protected string $message = '';
    protected array  $data    = [];

    protected function success(string $message = 'success', array $data = []): bool
    {
        $this->message = $message;
        $this->data    = $data;
        return true;
    }

    protected function error(string $message = 'error', array $data = []): bool
    {
        $this->message = $message;
        $this->data    = $data;
        return false;
    }

    public function getMessage(): string
    {
        return $this->message;
    }

    public function getData(): array
    {
        return $this->data;
    }
}